<?php#[商城配置]class ConfigController extends AcommonController{    #[商城配置信息查看]    public function viewAction($returnData=FALSE)    {        $type = $this->get('type/d');        $rows = configModel::where('type', $type)->orderBy('weigh', 'desc')->get()->toJson();        $this->_view->assign('dataset', $rows);        $this->_view->display( strtolower($this->controller) . '/edit.html');    }    #[商城配置信息编辑]    public function editAction()    {        $rows = $this->get();        if(is_array($rows) && !empty($rows)){            foreach ($rows as $k=>$v){                $row = configModel::find($v['id']);                $row->value = $v['value'];                $row->save();            }        }        json([            'ret' => 0,            'msg' => '更新数据成功',        ]);    }}